<div style="height:50px; line-height:50px; clear:both;"></div>
<div class="v_nav">
	<div class="vf_nav">
		<ul>
			<li> <a href="{:U('Index/index')}">
			    <i class="vf_1"></i>
			    <span>首页</span></a></li>
			<li><a href="javascript:void(0)" onclick="open_kefu()" class="kefu">
			    <i class="vf_2"></i>
			    <span>客服</span></a></li>
			<li><a href="{:U('Goods/categoryList')}">
			    <i class="vf_3"></i>
			    <span>分类</span></a></li>
			<li>
			<a href="{:U('Cart/cart')}">
			   <em class="global-nav__nav-shop-cart-num" id="cart_quantity" style="right:9px;"></em>
			   <i class="vf_4"></i>
			   <span>购物车</span>
			   </a>
			</li>
			<li><a href="{:U('User/index')}">
			    <i class="vf_5"></i>
			    <span>我的</span></a>
			</li>
	
		</ul>
	</div>
</div> 
<if condition="session('user.subscribe') eq 0">
<span class="subscribe_wx_btn" onclick="follow_wx()">关注微信号</span>
<elseif condition="session('user.mobile') eq ''">
<a class="subscribe_wx_btn" href="{:U('User/userinfo')}">注册送积分</a>
</if>
<link rel="stylesheet" href="//res.layui.com/layui/build/css/layui.css" media="all">
<script type="text/javascript" src="__PUBLIC__/static/js/layer/layer.js"></script>
<script type="text/javascript">
add_tips();
function add_tips(){
	$.post('{:U("kefu/Webchat/count_message")}',{user_id:'{$user.user_id}'},function(res){
		$('.message_count').remove();
		if(res>0){
			$('.kefu').prepend('<em class="message_count" id="message_count" style="right:9px;">'+res+'</em>');
		}
	})	
}

function add_kefu_name(kf_name){
	$('.layui-layer-title').children('.kf_name').remove();
	$('.layui-layer-title').append('<span class="kf_name" style="color:#666;margin-left:2px;font-size:13px">['+kf_name+']</span>');
}
function onputin(){
	$('.layui-layer-title').children('.intputin').remove();
	$('.layui-layer-title').append('<span class="intputin" style="color:#999;margin-left:2px;font-size:12px">对方正在输入...</span>');
	
	
}

// 关注微信公众号二维码	 
function follow_wx()
{
	layer.open({
		type : 1,  
		title: '长按二维码关注微信',
		content: '<img src="{$weixin_config['qr']}" width="200">',
		style: ''
	});
}
function open_kefu(){
	var url = "{:U('kefu/Webchat/index')}?user_id={$user.user_id}";
	    layer.open({
	        type: 2,
	        title: '在线客服',
	        shadeClose: true,
	        shade: 0.8,
	        area: ['100%', '600px'],
	        content: url
	    });
	    $('body,html').height($(window).height()).css({
        	"overflow": "hidden"
    	});

	    var win_h= $(window).height();
	    $('.layui-layer-iframe').height(win_h).css({'position':'fixed','bottom':0});

	
	$('.layim-send-close,.layui-layer-close').click(function(){
		layer.closeAll();
		$("body").height('auto').css({
         	"overflow-y": "auto"
        });
	})
}


/*if(getCookie('is_tishi')!='no'){
	 layer.open({
			type : 1,  
			title: '特别提示',
			content: '<p style="padding:6px">本商城目前为测试版本，所有操作仅供测试,<br/>不做其他用途。凡参与者，测试结束后将积分奖励。</p><p style="text-align:center;"><br/><input type="button" value="不再提醒" onclick="not_tishi()" style="padding:3px 5px"></p><br/>',
			style: ''
		});
}
*/
 function not_tishi(){
 	var exp = new Date();
    exp.setTime(exp.getTime() + 1 * 24 * 60 * 60 * 1000); //3天过期  
    document.cookie = "is_tishi" + "=" + encodeURIComponent('no') + ";expires=" + exp.toGMTString()+";path=/";
 	layer.closeAll();
 }
</script> 
<script type="text/javascript">
$(document).ready(function(){
	  var cart_cn = getCookie('cn');
	  if(cart_cn == ''){
		$.ajax({
			type : "GET",
			url:"/index.php?m=Home&c=Cart&a=header_cart_list",//+tab,
			success: function(data){								 
				cart_cn = getCookie('cn');
				$('#cart_quantity').html(cart_cn);						
			}
		});	
	  }
	  $('#cart_quantity').html(cart_cn);
});
</script>
<!-- 微信浏览器 调用微信 分享js-->
<if condition="$signPackage neq null">
	<include file="public/wx_share"/>
</if>
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?3866943f9037a5ddab357753ebc3d24a";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>

<!-- 微信浏览器 调用微信 分享js  end-->